﻿<%@ Assembly Name="VoteList, Version=1.0.0.0, Culture=neutral, PublicKeyToken=722bed34adb0e5a5" %>
<%@ Import Namespace="Microsoft.SharePoint.ApplicationPages" %>
<%@ Register TagPrefix="SharePoint" Namespace="Microsoft.SharePoint.WebControls"
    Assembly="Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@ Register TagPrefix="Utilities" Namespace="Microsoft.SharePoint.Utilities" Assembly="Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@ Register TagPrefix="asp" Namespace="System.Web.UI" Assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" %>
<%@ Import Namespace="Microsoft.SharePoint" %>
<%@ Assembly Name="Microsoft.Web.CommandUI, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="VotePage.aspx.cs" Inherits="VoteList.Layouts.VoteList.VotePage"
    DynamicMasterPageFile="~masterurl/default.master" %>

<asp:content id="PageHead" contentplaceholderid="PlaceHolderAdditionalPageHead" runat="server">
    <SharePoint:ScriptLink ID="ScriptLink1" Name="sp.ui.dialog.js" LoadAfterUI="true"
        Localizable="false" runat="server" />
  <SharePoint:ScriptLink ID="ScriptLink2" Name="/_layouts/VoteList/JS/lateload.js" LoadAfterUI="true"
        Localizable="false" runat="server" />
    <SharePoint:CssLink ID="CssLink1" DefaultUrl="/_layouts/VoteList/css/Style.css" runat="server">
    </SharePoint:CssLink>
    <SharePoint:CssLink ID="CssLink2" DefaultUrl="/_layouts/VoteList/css/hover.css" runat="server">
    </SharePoint:CssLink>
    <script type="text/javascript" src="/poll/_layouts/VoteList/JS/hover.js"></script>
    <script language="javascript">
        function openDialog() {
            var options = SP.UI.$create_DialogOptions();
            options.url = "/_layouts/VoteList/Message.aspx?Message=<%=Message%>",
            options.width = 350;
            options.height = 140;
            options.title = 'Message';
            options.showClose = true;
            options.allowMaximize = false;
            SP.UI.ModalDialog.showModalDialog(options);
        }
        function openCommentDialog(url) {
            var options = SP.UI.$create_DialogOptions();
            options.url = "comment.aspx?user=" + url;
            options.width = 550;
            options.height = 500;
            options.title = '留言';
            options.showClose = true;
            options.allowMaximize = false;
            SP.UI.ModalDialog.showModalDialog(options);
        }   
    </script>
</asp:content>
<asp:content id="Main" contentplaceholderid="PlaceHolderMain" runat="server">
    <div style="padding: 24px 0px 33px 0px; color: #808080; padding-left: 30px; font-family:微软雅黑;font-size:14px;">
        <b>列表次序不分先后, 每人限投两票,不允许将两票投给同一个人</b><div style="background-color: #d1d1d1; width: 500px;
            height: 1px; margin: 3px;">
        </div>
    </div>
    <div class="photo-content" style="padding-left: 30px; padding-right: 30px">
        <asp:Repeater ID="repeaterItems" runat="server">
            <ItemTemplate>
                <div onmouseover="pop.mouseIn(this,document.getElementById('s4-workspace'),'<%#DataBinder.Eval(Container.DataItem, "Account")%>');" onmouseout="pop.mouseOut(this,event);"
                    class="singleContent">
                    <div class="photo">
                        <img src='<%#DataBinder.Eval(Container.DataItem, "Url")%>' alt="" />
                    </div>
                    <div class="info">
                        <a id="<%#DataBinder.Eval(Container.DataItem, "Account")%>"
                            href="#">
                            <%#DataBinder.Eval(Container.DataItem, "Name")%></a><br />
                        工位：
                        <%#DataBinder.Eval(Container.DataItem, "Location")%><br />
                        票数：<span><%#DataBinder.Eval(Container.DataItem, "Votes")%></span>
                        <asp:Literal ID="literalJS" Text='<%#DataBinder.Eval(Container.DataItem, "Comments")%>' runat="server"></asp:Literal>
                    </div>
                    <div class="DesHidden">
                        <table style="width: 100%; height: 100%; padding: 5">
                            <tr style="width: 100%; height: 50%">
                                <td>
                                    <div class="DesHiddenText" style="font-size: 11px">
                                        <%#DataBinder.Eval(Container.DataItem, "DesignDes")%>
                                    </div>
                                </td>
                            </tr>
                            <%-- <tr style="width:100%;height:50%">
                        <td>
                        <textarea readonly='readonly' rows=8 cols=35 class="DesHiddenText" style="font-size:11px;"><%#DataBinder.Eval(Container.DataItem, "Comments")%></textarea>
                        </td>
                        </tr>--%>
                        </table>
                    </div>
                    <div class="button">
                        <asp:ImageButton ID="ImageButton1" ImageUrl="Images/ButtonVote.png" CommandArgument='<%#DataBinder.Eval(Container.DataItem, "Account")%>'
                            OnClick="DoVote" runat="server" />
                    </div>
                </div>
            </ItemTemplate>
        </asp:Repeater>
    </div>
    <div style="float: right; display: none;">
        <table cellpadding="0" cellspacing="0">
            <tr>
                <td align="right" style="text-align: right;">
                    <asp:Label ID="lblCurrentPage" runat="server"></asp:Label>
                </td>
            </tr>
            <tr>
                <td style="text-align: right;">
                    <asp:LinkButton ID="FirstPage" Text="FirstPage" OnClick="FirstPage_click" runat="server"></asp:LinkButton>
                    <asp:LinkButton ID="CmdPrev" OnClick="cmdPrev_Click" runat="server" Text=" << "></asp:LinkButton>
                    <asp:LinkButton ID="CmdNext" OnClick="cmdNext_Click" runat="server" Text=" >> "></asp:LinkButton>
                    <asp:LinkButton ID="LastPage" Text="LastPage" OnClick="LastPage_click" runat="server" />
                </td>
            </tr>
        </table>
    </div>
</asp:content>
<asp:content id="PageTitle" contentplaceholderid="PlaceHolderPageTitle" runat="server">
    Vote Application Page
</asp:content>
<asp:content id="PageTitleInTitleArea" contentplaceholderid="PlaceHolderPageTitleInTitleArea"
    runat="server">
    Vote Application Page
</asp:content>
